<template>
  <div class="my-container">
    <el-row>
      <el-col :span="6"
        ><ProjectCard class="user-card" :features="featureData"
      /></el-col>
      <el-col :span="18">
        <el-card>
          <el-tabs v-model="activeName">
            <el-tab-pane :label="$t('msg.profile.feature')" name="feature"
              ><Feature :features="featureData"
            /></el-tab-pane>
            <el-tab-pane :label="$t('msg.profile.chapter')" name="chapter"
              ><Chapter
            /></el-tab-pane>
            <el-tab-pane :label="$t('msg.profile.author')" name="author"
              ><Author
            /></el-tab-pane>
          </el-tabs>
        </el-card>
      </el-col>
    </el-row>
  </div>
</template>

<script setup>
import ProjectCard from './components/ProjectCard.vue'
import Author from './components/author.vue'
import Chapter from './components/chapter.vue'
import Feature from './components/feature.vue'
import { onMounted, ref } from 'vue'
import { feature } from '@/api/user'
const activeName = ref('feature')

const featureData = ref([])
const getfeatureData = async () => {
  featureData.value = await feature()
}
onMounted(() => {
  getfeatureData()
})
</script>

<style lang="scss" scoped>
.my-container {
  .user-card {
    margin-right: 20px;
  }
}
</style>
